/**
 * 代号:艾特 2017：厚溥
 * 文件名：City.java
 * 创建人：jh
 * 日期：2017年11月20日
 * 修改人：
 * 描述：
 */
package org.setone.model;

import javax.persistence.ConstraintMode;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * 用途：业务模块名称
 */
@Entity
@Table(name = "street")
public class Street {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;//id
	private String name;//街道名称
	private String mark;//街道信息
	@ManyToOne
	@JoinColumn(name = "city_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
	@NotFound(action = NotFoundAction.IGNORE)
	private City city; // 城市外键
	
	public City getCity() {
		return city;
	}
	public void setCity(City city) {
		this.city = city;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMark() {
		return mark;
	}
	public void setMark(String mark) {
		this.mark = mark;
	}
}
